package com.alibaba.citrus.cr.platform.enhance.functions.customer;

import com.alibaba.citrus.cr.common.util.SpringContextUtil;
import com.alibaba.citrus.cr.platform.enhance.repository.CustomerSaleScopeRepository;

import com.epoch.app.crplatformenhance.sdo.CustomerSaleScopeSDO;
import lombok.Getter;
import lombok.Setter;

public class CustomerSaleScopeEntity {
    @Getter
    @Setter
    private CustomerSaleScopeSDO sdo;

    private static CustomerSaleScopeRepository saleScopeRepository;

    static {
        saleScopeRepository = SpringContextUtil.getBean(CustomerSaleScopeRepository.class);
    }

    public static CustomerSaleScopeEntity of(CustomerSaleScopeSDO sdo) {
        CustomerSaleScopeEntity entity = new CustomerSaleScopeEntity();
        entity.setSdo(sdo);
        return entity;
    }


    public Boolean edit() {
        return saleScopeRepository.edit(this.sdo);
    }

}
